3591fcd58568ed5cfa8b1b879a9510327c102b05,framework/minilang/src/org/ofbiz/minilang/method/eventops/SessionToField.java,SessionToField,exec,#MethodContext#,56

Before Change


        Object fieldVal = null;
        // only run this if it is in an EVENT context
        if (methodContext.getMethodType() == MethodContext.EVENT) {
            fieldVal = sessionAcsr.get(methodContext.getRequest().getSession(), methodContext.getEnvMap());
            if (fieldVal == null) {
                Debug.logWarning("Session attribute value not found with name " + sessionAcsr, module);
            }

After Change


    public boolean exec(MethodContext methodContext) throws MiniLangException {
        if (methodContext.getMethodType() == MethodContext.EVENT) {
            String attributeName = attributeNameFse.expandString(methodContext.getEnvMap());
            Object value = methodContext.getRequest().getSession().getAttribute(attributeName);
            if (value == null || (value instanceof String && ((String) value).isEmpty())) {
                value = defaultFse.expandString(methodContext.getEnvMap());
            }